package com.videohub.videohub.fragments.recommend;

import android.content.Context;
import android.net.Uri;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.facebook.drawee.view.SimpleDraweeView;
import com.squareup.picasso.Picasso;
import com.videohub.videohub.R;
import com.youth.banner.loader.ImageLoader;


public class GlideImageLoader extends ImageLoader {
    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
        //具体方法内容自己去选择，次方法是为了减少banner过多的依赖第三方包，所以将这个权限开放给使用者去选择
//        imageView.setImageResource(R.drawable.ic_menu_camera);
        Glide.with(context.getApplicationContext())
                .load(path)
                .error(R.drawable.ic_menu_gallery)
                .into(imageView);
//        Picasso.with(context).load(path).into(imageView);
//        Picasso.get().load((String)path).into(imageView);
//        Picasso.get().load("http://i.imgur.com/DvpvklR.png").error(R.drawable.ic_menu_camera).into(imageView);

    }
}
